#pragma once
#include"RBTree.h"

namespace myset
{
	template<class K>
	class set
	{
		struct SetKeyOfT
		{
			const K& operator()(const K& K)
			{
				return K;
			}
		};
	public:
		using iterator = typename RBTree<K, const K, SetKeyOfT>::Iterator;
		using const_iterator = typename RBTree<K, const K, SetKeyOfT>::ConstIterator;

		iterator begin()
		{
			return _t.begin();
		}
		iterator end()
		{
			return _t.end();
		}
		const_iterator begin() const
		{
			return _t.begin();
		}
		const_iterator end() const
		{
			return _t.end();
		}
		pair<iterator, bool> insert(const K& k)
		{
			return _t.Insert(k);
		}
	private:
		RBTree<K, const K, SetKeyOfT> _t;
	};
}
